import * as EmSDK from "../util/emSDK";
import * as AdapterConstant from '../constants/adapter';
import * as H5SDK from './H5SDK';

export default class H5Api{
    constructor() {
        // this.voice = this.voice.bind(this);
        // this.voiceStop = this.voiceStop.bind(this);
        // this.position = this.position.bind(this);
    }

    //录音
    // voice() {
    //     H5SDK.voiceStart();
    // }
    //录音结束
    // voiceStop(callback) {
    //    return H5SDK.voiceStop(callback);
    // }

    //位置
    // position() {
    //    return H5SDK.getLocation();
    // }


     //获取位置
     getLocation(){
      window.historyRoute.push({
        pathname: "/req/map",
        params: {},
      });
    }

      //查看位置
    openLocation(params = {}){
        window.historyRoute.push({
          pathname: "/req/map",
          params: params,
        });
      }
      
    judgeApiSupport(api = ''){
        // switch (api){
        //     case AdapterConstant.API_VOICE:
        //     case AdapterConstant.API_POSITION:
        //     case AdapterConstant.API_VOICE_STOP:
        //         return true;
        //     default:
        //         return false;
        // }
        return false;
    }
}